<script type="text/javascript">
$(document).ready(function(){
    $('.open-task').click(function(){
       var trigid = $(this).attr('id');
       $('#facade').css('height', $(document).height());
       $('#facade').css("display", "block");
       $.ajax({
         url: '/matter/tasklist/event_id/' + trigid,
         type: 'POST',
         data: {},
         success: function(data){
             $('#tasklist-pop-up').html(data);
             $('#tasklist-pop-up').css('display', 'block');
         }
       });
    });
});
</script>

<?php foreach($this->open_tasks as $open_task){
$task_name  = $open_task['task_name'];
$task_name .= ($open_task['task_detail'])?" - ".$open_task['task_detail']: "";

$matter_UID  = $open_task['caseref'];
$matter_UID .= ($open_task['country'])? " ".$open_task['country']: "";
$matter_UID .= ($open_task['origin'])? " ".$open_task['origin']: "";
$matter_UID .= ($open_task['type_code'])? " ".$open_task['type_code']: "";
?>
   <li id="<?=$open_task['task_ID']?>"><div class="col-task-name"><a href="javascript:void(0);" class="open-task" id="<?=$open_task['trigger_ID']?>"><?=$task_name?></a></div><div class="col-task-matter"><a href="/matter/view/id/<?=$open_task['MID']?>"><?=$open_task['UID']?></a></div><div class="col-task-due_date"><?=$open_task['due_date']?></div>
<div class="col-actions"><input type="checkbox" name="clear-task-<?=$open_task['task_ID']?>" id="<?=$open_task['task_ID']?>" class="clear-open-task" value="Clear" /></div></li>
<?php } ?>
